package com.cat.pojo;

import java.util.HashMap;
import java.util.Map;

public class Student {

    public static final byte MALE = 0;
    public static final byte FEMALE =1 ;
    public static final byte ADMIN = 0;
    public static final byte USER = 1;

    private String studentId;
    private String studentName;
    private String phoneNumber;
    private String password;
    private String userType;
    private String portrait;
    private String gender;
    private String major;
    private String majorClass;
    private String position;
    private String introduction;


    public Map<String, String> validate() {
        Map<String, String> map = new HashMap<String, String>();

        if (studentId==null||studentId.trim().isEmpty()) {
            map.put("studentId", "学号不能为空");
        }

        if (password == null || password.trim().isEmpty()) {
            map.put("password", "密码不能为空");
        }

        if (phoneNumber == null || phoneNumber.trim().isEmpty()) {
            map.put("phoneNumber", "手机号不能为空");
        }

        if (studentName == null || studentName.trim().isEmpty()) {
            map.put("studentName", "姓名不能为空");
        }
        return map;
    }


    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getMajorClass() {
        return majorClass;
    }

    public void setMajorClass(String majorClass) {
        this.majorClass = majorClass;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

}
